#include<iostream>
#include "namepipe.hpp"

int main()
{
    int fd=open(path,O_WRONLY);
    if(fd<0)
    {
       perror("open");
       exit(FIFO_OPEN_ERR);
    }
    cout << "client open file done" << endl;
    while(1)
    {
        string line;
        getline(cin,line);
        write(fd,line.c_str(),line.size());
    } 

    close(fd);
    return 0;
}